package com.xyd.Dao;

import com.xyd.Entity.Commodity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ProductClassMapper {

    /**
     * 得到商品名称和所属类别
     * @return
     */
    List<Commodity> getCommodityNameAndCommonId();

    /**
     * 通过Id查询商品
     * @param commodity_id
     * @return
     */
    Commodity getCommodityById(int commodity_id);



    /**
     * 根据商品类别查找
     * @param CommonId
     * @return
     */
    List<Commodity> getCommodityByCommonId(@Param("CommonId") int CommonId,@Param("start") int start);

    /**
     * 根据商品类别查找总数
     * @param CommonId
     * @return
     */
    int countgetCommodityByCommonId(@Param("CommonId") int CommonId);


}
